@extends('student')
@section('content')

    @include('student.message')
    <h1>学生列表</h1>
    <section>
        <table width="500" border="1">
            <tr>
                <th scope="col">ID</th>
                <th scope="col">姓名</th>
                <th scope="col">年龄</th>
                <th scope="col">性别</th>
                <th scope="col">操作</th>
            </tr>
            @foreach($students as $students)
            <tr>
                <td>{{$students->id}}</td>
                <td>{{$students->name}}</td>
                <td>{{$students->age}}</td>
                <td>@if($students->sex == 10)未知@elseif($students->sex == 20)男@elseif($students->sex == 30)女@endif</td>
                <td><a class="hre" href="{{url('student/form_detail/'.$students->id)}}">详情</a>
                    <a class="hre" href="{{url('student/form_edit/'.$students->id)}}">修改</a>
                    <a class="hre" href="{{url('student/form_del/'.$students->id)}}" onclick="return confirm('确认删除?');">删除</a></td>
            </tr>
            @endforeach
        </table>
    </section>
@stop